/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.acq.service.areainfo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.acq.dao.areainfo.AcqAreaInfoDao;
import com.thinkgem.jeesite.modules.acq.entity.areainfo.AcqAreaInfo;

/**
 * 产地环境信息Service
 * @author lj
 * @version 2018-04-08
 */
@Service
@Transactional(readOnly = true)
public class AcqAreaInfoService extends CrudService<AcqAreaInfoDao, AcqAreaInfo> {

	public AcqAreaInfo get(String id) {
		return super.get(id);
	}
	
	public List<AcqAreaInfo> findList(AcqAreaInfo acqAreaInfo) {
		return super.findList(acqAreaInfo);
	}
	
	public Page<AcqAreaInfo> findPage(Page<AcqAreaInfo> page, AcqAreaInfo acqAreaInfo) {
		return super.findPage(page, acqAreaInfo);
	}
	
	@Transactional(readOnly = false)
	public void save(AcqAreaInfo acqAreaInfo) {
		super.save(acqAreaInfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(AcqAreaInfo acqAreaInfo) {
		super.delete(acqAreaInfo);
	}
	@Transactional(readOnly = false)
	public Map<String,Object> saveAreaInfo(AcqAreaInfo acqAreaInfo) {
		Map<String,Object> result = new HashMap<String,Object>();
		try{
			dao.saveAreaInfo(acqAreaInfo);
			result.put("msg", "保存成功");
			result.put("success", true);
			return result;
		}catch(Exception e){
			e.printStackTrace();
			result.put("msg", "保存成功");
			result.put("success", true);
			return result;
		}
		
		
	}
	
}